# Maintainer: David Runge <dave@sleepmap.de>
pkgname=zita-lrx
pkgver=0.1.2
pkgrel=2
pkgdesc="Command line JACK application providing 2, 3, or 4-band, 4th order crossover filters"
arch=('loong64' 'x86_64')
url="https://kokkinizita.linuxaudio.org/linuxaudio/"
license=('GPL3')
groups=('pro-audio')
depends=('clthreads' 'jack')
source=("https://kokkinizita.linuxaudio.org/linuxaudio/downloads/${pkgname}-${pkgver}.tar.bz2")
sha512sums=('a3f74f788e2bb9d1ad13aa454552a61e08ca7b56fd286ee070aa746c40f9bc351ce8142dcd384a11b870b2379d531959c896a058e5601020ad82ac8a4cd92f09')

prepare() {
  cd "${pkgname}-${pkgver}/source"
  # remove optimization
  sed -e '/native/d' -i Makefile
}

build() {
  cd "${pkgname}-${pkgver}/source"
  make
}

package() {
  cd "${pkgname}-${pkgver}/source"
  make PREFIX=/usr DESTDIR="$pkgdir/" install
  # docs
  install -t "${pkgdir}/usr/share/doc/${pkgname}" \
    -vDm 644 ../{AUTHORS,README*}
  # examples
  install -t "${pkgdir}/usr/share/${pkgname}/examples" \
    -vDm 644 ../examples/*
}
